#include "TraceEventCallbackBase.h"
#include "ProviderGuids.h"
#include <regex>

#define VERSION4OFFSET 36
#define TOKENSIZE 16

class CommandLineFilteredTraceEventCallback : public TraceEventCallbackBase {
private:
    int commandLineToProcessId; // only track a single PID
    std::wregex commandLineRegex;
    bool ParseAndSetProcessInformation(_In_ PEVENT_RECORD);
public:
    STDMETHOD(OnEvent)(_In_ ITraceEvent* traceEvent, _In_ ITraceRelogger* relogger);
    CommandLineFilteredTraceEventCallback(LPCWSTR commandLine)
    {
        this->commandLineRegex = std::wregex(std::wstring(commandLine));
        this->commandLineToProcessId = 0;
    }
};